package cn.com.netedge.iot.frontend.biz.protocol;


import cn.com.netedge.iot.common.dataobject.CmdMsgReq;
import cn.com.netedge.iot.common.dataobject.CmdMsgResp;
import cn.com.netedge.iot.common.dataobject.ReceiveFrame;
import cn.com.netedge.iot.common.exception.BizException;
import cn.com.netedge.iot.frontend.biz.vo.DeviceTask;

/**
 * Created by Administrator on 2018-09-12.
 */
public abstract class AbstractHandle {

    public abstract CmdMsgResp decoder(ReceiveFrame frame) throws BizException;

    public abstract byte[] encoder(CmdMsgReq req) throws BizException;

    public abstract void preEncoder(CmdMsgReq req);

    public abstract boolean isTaskMatch(DeviceTask deviceTask, CmdMsgResp resp);

}
